pb:
	protoc --proto_path=. --go_out=plugins=grpc:. proto/user/user.proto
	protoc --proto_path=. --go_out=plugins=grpc:. proto/integral/integral.proto
	protoc --proto_path=. --go_out=plugins=grpc:. proto/like/like.proto
	protoc --proto_path=. --go_out=plugins=grpc:. proto/comment/comment.proto

build:
	export GO111MODULE=on
	export GOPROXY=https://goproxy.io
	GOOS=linux GOARCH=amd64 go build -tags netgo -o ./bin/app ./main.go

dev:
	go run main.go

docker:
	export GO111MODULE=on
	export GOPROXY=https://goproxy.io
	GOOS=linux GOARCH=amd64 go build -tags netgo -o ./bin/app ./main.go
	docker network create --subnet 172.20.0.0/16 my_net1
	docker-compose build
	docker-compose up -d

rebuild:
	export GO111MODULE=on
	export GOPROXY=https://goproxy.io
	GOOS=linux GOARCH=amd64 go build -tags netgo -o ./bin/rpc_srv ./main.go
	docker-compose restart rpc-srv

app:
	docker exec -it rpc-srv /bin/sh

log:
	tail -F /app/app_logs/stdout_logfile.log
